package com.example.sapk3;

import java.util.HashMap;
import java.util.Map;

import org.json.JSONObject;

public class JsonHelper {
	public Map<String, String> json_decode(String str){
		Map<String, String> map=new HashMap<String, String>(); 
		String str1 = "";
		String str2 = "";
		String str3 = "";
		String str4 = "";
		try{
			JSONObject jo = new JSONObject(str);
			str1 = jo.getString("sinashort");
			str2 = jo.getString("short");
			str3 = jo.getString("durl");
			str4 = jo.getString("sname");
			map.put("sinashort", str1);
			map.put("short", str2);
			map.put("durl", str3);
			map.put("sname", str4);
		}catch(Exception e){
			
		}finally{
			
		}
		return map;
	}
	
	public  void json_encode(){
		
	}

}
